/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.pay.merchant.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * merchant_detailsEntity
 * @author hzy
 * @version 2019-11-22
 */
@Table(name="merchant_details", alias="a", columns={
		@Column(name="details_id", attrName="detailsId", label="列表id", isPK=true),
		@Column(name="pay_type", attrName="payType", label="支付类型"),
		@Column(name="pay_name", attrName="payName", label="账号名"),
		@Column(name="appid", attrName="appid", label="应用id"),
		@Column(name="mch_id", attrName="mchId", label="商户id，商户号，合作伙伴id"),
		@Column(name="cert_store_type", attrName="certStoreType", label="PATH,STR,INPUT_STREAM"),
		@Column(name="key_private", attrName="keyPrivate", label="私钥或私钥证书"),
		@Column(name="key_public", attrName="keyPublic", label="公钥或公钥证书"),
		@Column(name="key_cert", attrName="keyCert", label="key证书"),
		@Column(name="key_cert_pwd", attrName="keyCertPwd", label="私钥证书"),
		@Column(name="notify_url", attrName="notifyUrl", label="异步回调"),
		@Column(name="return_url", attrName="returnUrl", label="同步回调地址"),
		@Column(name="sign_type", attrName="signType", label="签名方式"),
		@Column(name="key_type", attrName="keyType", label="秘钥类型"),
		@Column(name="seller", attrName="seller", label="收款账号"),
		@Column(name="sub_app_id", attrName="subAppId", label="子appid"),
		@Column(name="sub_mch_id", attrName="subMchId", label="子商户id"),
		@Column(name="input_charset", attrName="inputCharset", label="编码类型，大部分为utf-8"),
		@Column(name="is_test", attrName="isTest", label="是否为测试环境", comment="是否为测试环境: 0 否，1 测试环境"),
	}, orderBy="a.details_id DESC"
)
public class MerchantDetails extends DataEntity<MerchantDetails> {
	
	private static final long serialVersionUID = 1L;
	private String detailsId;		// 列表id
	private String payType;		// 支付类型
	private String payName;		// 支付名
	private String appid;		// 应用id
	private String mchId;		// 商户id，商户号，合作伙伴id
	private String certStoreType;		// PATH,STR,INPUT_STREAM
	private String keyPrivate;		// 私钥或私钥证书
	private String keyPublic;		// 公钥或公钥证书
	private String keyCert;		// key证书
	private String keyCertPwd;		// 私钥证书
	private String notifyUrl;		// 异步回调
	private String returnUrl;		// 同步回调地址
	private String signType;		// 签名方式
	private String seller;		// 收款账号
	private String subAppId;		// 子appid
	private String subMchId;		// 子商户id
	private String inputCharset;		// 编码类型，大部分为utf-8
	private Integer isTest;		// 是否为测试环境: 0 否，1 测试环境
	private String keyType;
	
	public MerchantDetails() {
		this(null);
	}

	public MerchantDetails(String id){
		super(id);
	}
	
	public String getDetailsId() {
		return detailsId;
	}

	public void setDetailsId(String detailsId) {
		this.detailsId = detailsId;
	}
	
	@NotBlank(message="支付类型不能为空")
	@Length(min=0, max=16, message="支付类型长度不能超过 16 个字符")
	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	@NotBlank(message="支付名不能为空")
	public String getPayName() {
		return payName;
	}

	public void setPayName(String payName) {
		this.payName = payName;
	}

	@Length(min=0, max=32, message="应用id长度不能超过 32 个字符")
	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}
	
	@Length(min=0, max=32, message="商户id，商户号，合作伙伴id长度不能超过 32 个字符")
	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}
	
	@Length(min=0, max=16, message="PATH,STR,INPUT_STREAM长度不能超过 16 个字符")
	public String getCertStoreType() {
		return certStoreType;
	}

	public void setCertStoreType(String certStoreType) {
		this.certStoreType = certStoreType;
	}
	
	public String getKeyPrivate() {
		return keyPrivate;
	}

	public void setKeyPrivate(String keyPrivate) {
		this.keyPrivate = keyPrivate;
	}
	
	public String getKeyPublic() {
		return keyPublic;
	}

	public void setKeyPublic(String keyPublic) {
		this.keyPublic = keyPublic;
	}
	
	@Length(min=0, max=20480, message="key证书长度不能超过 20480 个字符")
	public String getKeyCert() {
		return keyCert;
	}

	public void setKeyCert(String keyCert) {
		this.keyCert = keyCert;
	}
	
	@Length(min=0, max=32, message="私钥证书长度不能超过 32 个字符")
	public String getKeyCertPwd() {
		return keyCertPwd;
	}

	public void setKeyCertPwd(String keyCertPwd) {
		this.keyCertPwd = keyCertPwd;
	}
	
	@Length(min=0, max=256, message="异步回调长度不能超过 256 个字符")
	public String getNotifyUrl() {
		return notifyUrl;
	}

	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}
	
	@Length(min=0, max=256, message="同步回调地址长度不能超过 256 个字符")
	public String getReturnUrl() {
		return returnUrl;
	}

	public void setReturnUrl(String returnUrl) {
		this.returnUrl = returnUrl;
	}
	
	@NotBlank(message="签名方式不能为空")
	@Length(min=0, max=16, message="签名方式长度不能超过 16 个字符")
	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}
	
	@Length(min=0, max=32, message="收款账号长度不能超过 32 个字符")
	public String getSeller() {
		return seller;
	}

	public void setSeller(String seller) {
		this.seller = seller;
	}
	
	@Length(min=0, max=32, message="子appid长度不能超过 32 个字符")
	public String getSubAppId() {
		return subAppId;
	}

	public void setSubAppId(String subAppId) {
		this.subAppId = subAppId;
	}
	
	@Length(min=0, max=32, message="子商户id长度不能超过 32 个字符")
	public String getSubMchId() {
		return subMchId;
	}

	public void setSubMchId(String subMchId) {
		this.subMchId = subMchId;
	}
	
	@NotBlank(message="编码类型，大部分为utf-8不能为空")
	@Length(min=0, max=16, message="编码类型，大部分为utf-8长度不能超过 16 个字符")
	public String getInputCharset() {
		return inputCharset;
	}

	public void setInputCharset(String inputCharset) {
		this.inputCharset = inputCharset;
	}
	
	@NotNull(message="是否为测试环境不能为空")
	public Integer getIsTest() {
		return isTest;
	}

	public void setIsTest(Integer isTest) {
		this.isTest = isTest;
	}

	@NotNull(message="秘钥类型不能为空")
	public String getKeyType() {
		return keyType;
	}

	public void setKeyType(String keyType) {
		this.keyType = keyType;
	}
}